package models

import (
	"fmt"
	"takeout-ordering/common/initialize"
)

func Migrate() {
	err := initialize.DB.AutoMigrate(&User{}, &Meals{}, &Order{}, &Coupon{}, &UserCoupon{})
	if err != nil {
		fmt.Println("数据迁移失败")
		return
	} else {
		fmt.Println("数据迁移成功")
	}
}
